<template>
	<view>
		<u-navbar :is-back="true" title="账号与安全" title-bold title-color="#000000" :title-size="34" :background="{ background: '#eeeeee'}" 
		:border-bottom="false"></u-navbar>
		<u-cell-group>
			<u-cell-item :title="app_name + '号'"  :title-style="titleStyle" @click="toShowDetail(0)"	
										:value="vuex_userInfo.chatNumber" :value-style="valueStyle"></u-cell-item>
			<u-cell-item title="手机号"    :title-style="titleStyle" @click="toShowDetail(1)" :value="formatTel()" :value-style="titleStyle"></u-cell-item>
			<u-gap height="20" bg-color="#eee" margin-top="1" margin-bottom="1"></u-gap>
			<u-cell-item :title="app_name + '密码'"  :title-style="titleStyle"  value="已设置" :value-style="titleStyle"></u-cell-item>
			<u-cell-item title="声音锁"  :title-style="titleStyle"  value="未设置"  :value-style="titleStyle"></u-cell-item>
			<u-gap height="20" bg-color="#eee" margin-top="1" margin-bottom="1"></u-gap>
			<u-cell-item title="应急联系人"  :title-style="titleStyle"></u-cell-item>
			<u-cell-item title="登录设备管理"  :title-style="titleStyle"></u-cell-item>
			<u-cell-item title="更多安全设置"  :title-style="titleStyle"></u-cell-item>
			<u-gap height="20" bg-color="#eee" margin-top="1" margin-bottom="1"></u-gap>
			<u-cell-item title="插件"  :title-style="titleStyle"></u-cell-item>
			<u-gap height="20" bg-color="#eee" margin-top="1" margin-bottom="1"></u-gap>
			<u-cell-item title="帮朋友冻结帐号"  :title-style="titleStyle"></u-cell-item>
			<u-cell-item :title="app_name + '安全中心'"  :title-style="titleStyle"></u-cell-item>
		</u-cell-group>
		<view class="u-line-2 u-p-l-30 u-p-r-30 u-p-t-10">
			<text>如果遇到帐号信息泄露、忘记密码、诈骗等帐号安全问题，可前往安全中心。</text>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
        app_name: process.env.VUE_APP_NAME,
				titleStyle:{
					fontSize:"32rpx",
					color:'#333'
				},
				valueStyle:{
					fontSize:"32rpx",
					color:'#333',
					paddingLeft:'200rpx'
					//maxWidth:'300rpx'
				}
			};
		},
		methods:{
			formatTel:function(){
				let that=this;
				let tel= that.vuex_userInfo.mobile;
				console.log("tel",tel);
				if(tel){
					let first= tel.substring(0,3);
					let last= tel.substring(9,11);
					return first+'******'+last;
				}
				else{
					return "未绑定";
				}
			},
			toShowDetail:function(type){
				let that=this;
				this.$u.route({
					url:"/pages/my/show-mobile-chatNumber/show-mobile-chatNumber",
					params:{
						type:type
					}
				});
			}
		}
	}
</script>

<style lang="scss" scoped>

</style>
<style>
	page{
		background-color: #eeeeee;
	}
</style>

